package servlet.zj;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.zj.AdminDao;

/**
 * Servlet implementation class UpAdminMessage
 */
@WebServlet("/UpAdminMessage")
public class UpAdminMessage extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private AdminDao one=new AdminDao();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		int id=Integer.valueOf(request.getParameter("id"));
		String user=request.getParameter("user");
		String name=request.getParameter("name");
		String sex=request.getParameter("sex");
		String date=request.getParameter("birthday");
		String src=request.getParameter("src");
		String phone=request.getParameter("phone");
		one.upadminmassess(id, user, name, date, sex, src, phone);
		response.sendRedirect("AdminServlet?curpage=1&pagesize=5");
	}
	
}
